import 'babel-polyfill';
import Vue from 'vue'
import App from './App.vue'
import router from './router'






Vue.prototype.$bus = new Vue()


/* 全部引入 */
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
Vue.use(ElementUI)

/* 按需引入 */
// import { Button, Select, Table } from 'element-ui'
// Vue.use(Button)
// Vue.use(Select)
// Vue.use(Table)

Vue.config.productionTip = false

//百度统计
router.afterEach( ( to, from, next ) => {
 setTimeout(()=>{
   var _hmt = _hmt || [];
   (function() {
    //每次执行前，先移除上次插入的代码
    document.getElementById('baidu_tj') && document.getElementById('baidu_tj').parentNode.removeChild(document.getElementById('baidu_tj'))
    var hm = document.createElement("script");
    hm.src = "https://hm.baidu.com/hm.js?58acf9f5f79efcdb8c74fda97dd2e8ea";
    hm.id = "baidu_tj"
    var s = document.getElementsByTagName("script")[0];
    s.parentNode.insertBefore(hm, s);
   })();
 },0);
} );



new Vue({
  router,
  render: h => h(App)
}).$mount('#app')
